package com.hlhj.carview.aty

import android.os.Bundle
import android.view.View
import com.example.mymvp.mvp.BaseMvpAty
import com.example.mymvp.mvp.BasePresenter
import com.example.mymvp.mvp.BaseView
import com.gyf.barlibrary.ImmersionBar
import com.hlhj.carview.R

/**
 * Created by Never Fear   on 2018\12\24 0024.
Never More....
 */
abstract class BaseMapAty<V: BaseView,P: BasePresenter<*, V>>: BaseMvpAty<V, P>() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getContentID())
        initMap(savedInstanceState)
        ImmersionBar.with(this)
                .init()
        supportActionBar?.hide()
        presenter?.let {
            it.initView()
            it.setListener()
            it.logicStart()
        }
        findViewById<View>(R.id.btExit)?.let {
            it.setOnClickListener {
                finish()
            }
        }

    }

    abstract fun initMap(savedInstanceState: Bundle?)


    abstract fun getContentID(): Int



}